﻿using Microsoft.EntityFrameworkCore;
using Abp.Zero.EntityFrameworkCore;
using DualControl.Authorization.Roles;
using DualControl.Authorization.Users;
using DualControl.MultiTenancy;
using DualControl.Departments;
using DualControl.Posts;
using DualControl.UserPosts;
using DualControl.RiskPoints;
using DualControl.HazardSources;
using DualControl.ControlMeasures;
using DualControl.CycleCheckTasks;
using DualControl.CycleCheckDetails;
using DualControl.EmergencyMeasures;
using DualControl.CompanyInfos;

namespace DualControl.EntityFrameworkCore
{
    public class DualControlDbContext : AbpZeroDbContext<Tenant, Role, User, DualControlDbContext>
    {
        /* Define a DbSet for each entity of the application */

        public virtual DbSet<Department> Departments { get; set; }

        public virtual DbSet<Post> Posts { get; set; }

        public virtual DbSet<UserPost> UserPosts { get; set; }

        public virtual DbSet<RiskPoint> RiskPoints { get; set; }

        public virtual DbSet<HazardSource> HazardSources { get; set; }

        //把风险因素作为Hazardous的一个属性，该实体不再需要
        //public virtual DbSet<RiskFactor> RiskFactors { get; set; }

        public virtual DbSet<ControlMeasure> ControlMeasures { get; set; }

        //应急处理措施
        public virtual DbSet<EmergencyMeasure> EmergencyMeasures { get; set; }

        //排查任务
        public virtual DbSet<CycleCheckTask> CycleCheckTasks { get; set; }

        //排查详情
        public virtual DbSet<CycleCheckDetail> CycleCheckDetails { get; set; } 

        //公司概况

        public virtual DbSet<CompanyInfo> CompanyInfos { get; set; }

        public DualControlDbContext(DbContextOptions<DualControlDbContext> options)
            : base(options)
        {
        }
    }
}
